//
//  CartoonAdvertisementModel.m
//  __PRODUCTNAME__
//
//  Created by Gollum on 16/09/24
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "CartoonAdvertisementModel.h"
#import "CartoonAdvertisementData.h"

@implementation CartoonAdvertisementModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [CartoonAdvertisementData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{

    NSMutableArray *dataArray = [NSMutableArray array];
    NSArray *valueArray = value;
    if ([key isEqualToString:@"data"]) {
        for (NSDictionary *dic in valueArray) {
            CartoonAdvertisementData *data = [CartoonAdvertisementData modelWithDic:dic];
            [dataArray addObject:data];
        }
        _data = dataArray;
    }

}
@end
